package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：
 * 作者：huangqiuxin on 2016/5/13 17:27
 * 邮箱：648859026@qq.com
 */
public class ForgotPasswordStep2Action extends AHttpService<PbBean.PbResUserForgotPasswordStep2> {

    private String mobile;
    private String verificationCode;

    public static ForgotPasswordStep2Action newInstance(Context context, String mobile, String verificationCode) {
        return new ForgotPasswordStep2Action(context, mobile, verificationCode);
    }

    private ForgotPasswordStep2Action(Context context, String mobile, String verificationCode) {
        super(context);
        this.mobile = mobile;
        this.verificationCode = verificationCode;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserForgotPasswordStep2.Builder builder = PbBean.PbReqUserForgotPasswordStep2.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setMobile(mobile);
        builder.setVerificationCode(verificationCode);

        return apiService.forgotPasswordStep2(builder.build());
    }
}
